home *** CD-ROM | disk | FTP | other *** search
- Short: Binary AVL & Splay trees non-recursive.
- Author: crh@ubiqx.mn.org (Christopher R. Hertel)
- Uploader: crh@ubiqx.mn.org (Christopher R. Hertel)
- Version: 2.4.
- Type: dev/c
-
- Written in C using OOP techniques, these modules provide three forms of
- binary tree: Simple (unbalanced) AVL (height-balanced), and Splay. AVL
- trees are re-balanced after every insertion or deletion. For each node in
- the tree, the difference in height between the left and right subtree is
- at most 1. Splay trees use a different approach. Each time a node is
- accessed (inserted, deleted, or directly found via a search), the node is
- bubbled to the top of the tree. This has the effect of making the tree
- 'bushier' and placing the most frequently accessed nodes nearer to the
- top.
-
- The functions are non-recursive to limit stack space usage, and can also
- be made into a run-time library. The type of tree used is determined by
- which header file is included with your program. No other code changes
- are necessary.
-
- Pretty darn fast, too, IMHO.
-
- Chris Hertel
-
-
- ============================= Archive contents =============================
-
- Original Packed Ratio Date Time Name
- -------- ------- ----- --------- -------- -------------
- 1038 581 44.0% 06-Aug-97 13:45:10 BinaryTrees.readme
- 27943 7334 73.7% 26-Jul-97 00:20:12 ubi_AVLtree.c
- 15982 5091 68.1% 26-Jul-97 00:20:18 ubi_AVLtree.h
- 42918 11362 73.5% 26-Jul-97 00:20:32 ubi_BinTree.c
- 35348 9211 73.9% 26-Jul-97 00:20:46 ubi_BinTree.h
- 19641 5910 69.9% 26-Jul-97 00:20:54 ubi_SplayTree.c
- 15650 4866 68.9% 26-Jul-97 00:21:00 ubi_SplayTree.h
- 9245 2664 71.1% 26-Jul-97 00:21:04 ubi_sample.c
- -------- ------- ----- --------- --------
- 167765 47019 71.9% 07-Aug-97 08:32:04 8 files
-